Function: c-restore-<>-properties

c-restore-<>-properties is a byte-compiled function defined in cc-engine.el.gz.

Signature

(c-restore-<>-properties BEG END OLD-LEN)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/cc-engine.el.gz
(defun c-restore-<>-properties (_beg _end _old-len)
  ;; This function is called as an after-change function.  It restores the
  ;; category/syntax-table properties on template/generic <..> pairs between
  ;; c-new-BEG and c-new-END.  It may do hidden buffer changes.
  (c-save-buffer-state ((c-parse-and-markup-<>-arglists t) lit-limits)
    (goto-char c-new-BEG)
    (if (setq lit-limits (c-literal-limits))
	(goto-char (cdr lit-limits)))
    (while (and (< (point) c-new-END)
		(c-syntactic-re-search-forward "[<>]" c-new-END 'bound))
      (if (eq (char-before) ?<)
	  (progn
	    (backward-char)
	    (let ((c-restricted-<>-arglists (c-<>-get-restricted)))
	      (or (c-forward-<>-arglist nil)
		  (c-forward-over-token-and-ws)
		  (goto-char c-new-END))))
	(save-excursion
	  (when (c-backward-<>-arglist nil nil #'c-<>-get-restricted)
	    (setq c-new-BEG (min c-new-BEG (point)))))))))